package wangyi;

import java.util.Scanner;

public class Main {
    public static void main(String[] agrs) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            int f = sc.nextInt();
            int d = sc.nextInt();
            int p = sc.nextInt();
            int day = 0;

            if (d < x) {
                System.out.println(0);
            }

            if (f * x >= d) {
                System.out.println(d/x);
            } else {
                System.out.println(f + (d - f * x) / (x + p));
            }
        }
    }
}
